﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Administrator/AdminMaster.Master" AutoEventWireup="true" CodeBehind="ModifySpecialist.aspx.cs" Inherits="MyHealthOnline.ModifySpecialist" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Register Assembly="SD.LLBLGen.Pro.ORMSupportClasses.NET20" Namespace="SD.LLBLGen.Pro.ORMSupportClasses" TagPrefix="LLBLGenPro" %>


<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
   
    <table>
        <tr>
            <td><asp:TextBox ID="nameTB" AutoPostBack="false" runat="server"></asp:TextBox>
            <ajaxToolkit:AutoCompleteExtender  ID="AutoCompleteExtender1" runat="server" 
                         ServiceMethod="getSpecialistsByName" ServicePath="~/WebServiceHO.asmx" 
                         TargetControlID="nameTB" MinimumPrefixLength="1">
            </ajaxToolkit:AutoCompleteExtender>
            </td>
            <td><asp:Button ID="btnSubmit" runat="server" Text="Search By Name" 
                    BackColor="Gray" onclick="btnSubmit_Click" /></td>
        </tr>
    </table>

 <asp:UpdatePanel ID="UPSpecialists" runat="server">
   <ContentTemplate>
   
   <asp:gridview id="empsGrid" runat="server" Width="16px" AlternatingRowStyle-BackColor="Beige"
            AllowPaging="True" PageSize="10" OnRowEditing="GridView1_RowEditing" 
            OnRowCancelingEdit="GridView1_RowCancelingEditing" OnRowUpdating="GridView1_RowUpdating"  
            autogeneratecolumns="false" style="margin-left: 0px">
             <headerstyle backcolor="darkslategray" forecolor="khaki"  />
             <rowstyle backcolor="ivory" verticalalign="top" />
             <editrowstyle backcolor="lightgreen" />
         <Columns >
            <asp:CommandField HeaderText="Edit" ShowEditButton="True" />
            <asp:BoundField DataField="Id" HeaderText="Id" ReadOnly="True" SortExpression="Id" />
            <%--Enabled='<%# Eval("Active") ? 0 : 1 %>'--%>
           <asp:TemplateField HeaderText="Active">
                <ItemTemplate>
                    <asp:CheckBox ID="chkBox" runat="server" Checked='<%# Bind("Active") %>' />
                </ItemTemplate>
            </asp:TemplateField>
            <%-- <asp:CheckBoxField ID="chkBox" DataField="Active"  HeaderText="Active" Enabled='<%# Eval("ColumnName") ? false : true %>' Checked='<%# Eval("ColumnName") %>' />--%>
          <%--<asp:BoundField DataField="DisciplineId" ControlStyle-Width="50px" HeaderText="Discipline"/>--%>
           <asp:TemplateField HeaderText="Discipline">
                        <EditItemTemplate>
                            <asp:DropDownList ID="ddlEditDiscipline" runat="server" DataSourceID="LLBLGenDisciplineId"
                            DataTextField="Id" DataValueField="Id" SelectedValue='<%# Bind("DisciplineId") %>'></asp:DropDownList>
                           <%-- <asp:UpdatePanel ID="PnlInDDL" runat="server" UpdateMode="Conditional">
                                <ContentTemplate>
                                    <asp:DropDownList ID="ddlEditDiscipline"  runat="server" DataValueField="Id" SelectedValue='<%# Bind("DisciplineId") %>'>
                                    </asp:DropDownList>
                                    <%--<ajaxToolkit:DropDownExtender ID="ddlEditDiscipline" runat="server" TargetControlID="disciplineLabel">
                                    </ajaxToolkit:DropDownExtender>
                                </ContentTemplate>
                            </asp:UpdatePanel>--%>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="disciplineLabel" runat="server" Text='<%# Bind("DisciplineId") %>'></asp:Label>
                        </ItemTemplate>
          </asp:TemplateField>
           
            <%--<asp:TemplateField HeaderText="Discipline">
                <ItemTemplate>
                <asp:FieldTemplateUserControl ID="ftuc" runat="server"/>
                     <asp:DropDownList ID="DisciplineDDL" runat="server" DataTextField="Id" 
                                        DataValueField="Id" SelectedValue='<%# Bind("DsciplineId") %>'>
                     </asp:DropDownList>
                </ItemTemplate> 
            </asp:TemplateField>--%>
            <asp:BoundField DataField="Name" HeaderText="Name" ControlStyle-Width="50px" SortExpression="Name" />
            <asp:BoundField DataField="Birthday" HeaderText="Birthday" ControlStyle-Width="50px" SortExpression="Birthday" />
             <asp:BoundField DataField="Sex" HeaderText="Sex" ControlStyle-Width="40px" SortExpression="Sex" />
            <%--<asp:TemplateField HeaderText="Sex">
                <ItemTemplate>
                    <asp:DropDownList ID="SexDDL" runat="server" DataTextField="Sex" DataValueField="Sex"></asp:DropDownList>
                </ItemTemplate>
            </asp:TemplateField>--%>

            <%--<asp:TemplateField HeaderText="dropdownlist name" Visible="False">
                <EditItemTemplate>
                    <asp:DropDownList ID="ddlName" runat="server" AppendDataBoundItems="true" DataSourceID="datasourcename" 
                            DataTextField="Keyfield" DataValueField="DataField" AutoPostBack="True" SelectedValue='<%# Eval("fieldname") %>'>
                        <asp:ListItem Value="">Select Number</asp:ListItem>
                    </asp:DropDownList>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:DropDownList ID="ddlName1" runat="server" AppendDataBoundItems="true" DataSourceID="datasource"  DataTextField="key" DataValueField="data" AutoPostBack="True" SelectedValue='<%# Eval("fieldname") %>'>
                        <asp:ListItem Value="">Select Number</asp:ListItem>
                    </asp:DropDownList>	
                </ItemTemplate>
            </asp:TemplateField>--%>

            <asp:BoundField DataField="Email" HeaderText="Email" ControlStyle-Width="50px" SortExpression="Email" />
            <asp:BoundField DataField="Password" HeaderText="Password" ControlStyle-Width="40px" SortExpression="Password" />
            <asp:BoundField DataField="Phone" HeaderText="Phone" ControlStyle-Width="40px" SortExpression="Phone" />
            <asp:BoundField DataField="Address" HeaderText="Address" ControlStyle-Width="40px" SortExpression="Address" />
            <asp:BoundField DataField="City" HeaderText="City" ControlStyle-Width="40px" SortExpression="City" />
            <asp:BoundField DataField="Country" HeaderText="Country" ControlStyle-Width="40px" SortExpression="Country" />
        </Columns>
    </asp:gridview> 
    </ContentTemplate>
    <%-- <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnSubmit" EventName="Click" />  
            <asp:AsyncPostBackTrigger ControlID="empsGrid" EventName="RowEditing" />
            <asp:AsyncPostBackTrigger ControlID="empsGrid" EventName="RowCancelingEdit" /> 
        </Triggers>--%>
</asp:UpdatePanel>


<LLBLGenPro:LLBLGenProDataSource ID="LLBLGenDisciplineId" runat="server" DataContainerType="EntityCollection"
            EntityCollectionTypeName="LLBLGenWebConsultationDAL.CollectionClasses.DisciplineCollection, LLBLGenWebConsultationDAL"
            EnableViewState="false" OnPerformSelect="Discipline_DS_PerformSelect" >
</LLBLGenPro:LLBLGenProDataSource>
</asp:Content>
